﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SharpDownloadSDK
{


    class PerfamanceUtilities
    {
        [System.Runtime.InteropServices.DllImport("Kernel32.dll")]
        static extern bool QueryPerformanceCounter(ref long count);

        [System.Runtime.InteropServices.DllImport("Kernel32.dll")]
        static extern bool QueryPerformanceFrequency(ref long count);

        public float GetSeconds(long beginCount, long endCount, long frequency)
        {
            return (endCount - beginCount) / (float)frequency;
        }
    }
}
